import Home from '@/components/index/home'
import ItemA from '@/components/item/itema'
import ItemB from '@/components/item/itemb'
import ItemC from '@/components/item/itemc'
import E404 from '@/components/error/404'


const routes = [
    {
        path: '/',
        name: 'home',
        // component: Home,
        component: () => import('@/components/index/home'),
        // component: resolve=>(require(["@/components/index/home"],resolve)),
        meta: {
            navShow: true,
            title: 'vue_element'
        },
        children: [
            {
                path: 'itema',
                name: 'itema',
                // component: ItemA,
                component: () => import('@/components/item/itema'),
                // component: resolve=>(require(["@/components/item/itema"],resolve)),
                meta: {
                    navShow: true,
                    title: 'itema'
                }
            },
            {
                path: 'itemb',
                name: 'itemb',
                // component: ItemB,
                component: () => import('@/components/item/itemb'),
                // component: resolve=>(require(["@/components/item/itemb"],resolve)),
                meta: {
                    navShow: true,
                    title: 'itemb'
                }
            },
            {
                path: 'itemc',
                name: 'itemc',
                // component: ItemC,
                component: () => import('@/components/item/itemc'),
                // component: resolve=>(require(["@/components/item/itemc"],resolve)),
                meta: {
                    navShow: true,
                    title: 'itemb'
                }
            }
        ],
    },
    {
        path: '/404',
        name: '404',
        // component: E404,
        component: () => import('@/components/error/404'),
        // component: resolve=>(require(["@/components/error/404"],resolve)),
        meta: {
            navShow: true,
            title: '页面不存在'
        }
    }
];

//路由列表
export default {
    routes
}
